using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;

namespace ThridGroup.ERP.ProductionSystem
{
    /// <summary>
    /// 车间实体
    /// </summary>
    public class Workshop : Entity<int>
    {
        /// <summary>
        /// 车间编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 车间名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 车间描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        public int ParentId { get; set; }

        /// <summary>
        /// 父级名称
        /// </summary>
        public string ParentName { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        public int Index { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnable { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDeleted { get; set; }

        /// <summary>
        /// 车间规模
        /// </summary>
        public string WorkshopSize { get; set; }

        /// <summary>
        /// 车间负责人
        /// </summary>
        public string WorkshopPerson { get; set; }

        /// <summary>
        /// 子节点列表（仅用于内存中的树形结构，不映射到数据库）
        /// </summary>
        public virtual List<Workshop> Children { get; set; }

        public Workshop()
        {
            Children = new List<Workshop>();
            CreateTime = DateTime.Now;
            IsEnable = true;
            IsDeleted = false;
            Index = 0;
            ParentId = 0;
        }

        public Workshop(int id) : base(id)
        {
            Children = new List<Workshop>();
            CreateTime = DateTime.Now;
            IsEnable = true;
            IsDeleted = false;
            Index = 0;
            ParentId = 0;
        }
    }
} 